<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\common\model\DiamondLog;
use app\common\model\GoldLog;
use app\common\model\MoneyLog;
use app\common\model\ScoreLog;

class Log extends Api
{
    protected $noNeedLogin = "";
    protected $noNeedRight = "*";

    public function score()
    {
        $this->success("", ScoreLog::where(['user_id' => $this->auth->id])->order("createtime DESC")->paginate());
    }

    public function money()
    {
        $this->success("", MoneyLog::where(['user_id' => $this->auth->id])->order("createtime DESC")->paginate());
    }

    public function gold()
    {
        $this->success("", GoldLog::where(['user_id' => $this->auth->id])->order("createtime DESC")->paginate());
    }

    public function diamond()
    {
        $this->success("", DiamondLog::where(['user_id' => $this->auth->id])->order("createtime DESC")->paginate());
    }

}